home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacAdvocate 2
/
MACADVCT.ISO
/
mac
/
Internet Stuff
/
NetStripper v3.1 ƒ
/
Scripting ƒ
/
Scripting Example
Wrap
Text File
|
1996-03-26
|
961b
|
23 lines
-- Sample script using NetStripper.
-- Copyright ⌐ 1995 Adam Lloyd, but feel free to use this for your own purposes.
-- Contact: adam@park78.ftech.co.uk
-- First of all, get hold of a text file from the user.
-- We'll use a standard get file box to do this.
global theTextFile -- the file we will be getting will be stored here
copy (choose file of type "TEXT") to theTextFile -- ask the user to select a text file
-- Now we actually tell NetStripper to convert that particular file into a DOS file.
tell application "NetStripper v2.5.2"
activate -- we want to see the translation in progress
Mac To DOS theTextFile -- do the conversion
quit -- quit from NetStripper (this won't happen automatically)
end tell
-- Now we'll show the text file using SimpleText. This will let you see the little boxes
-- that characterise a DOS text file.
tell application "SimpleText"
open theTextFile
activate -- activate SimpleText so we can see the text file
end tell